<!--#include file="pjson.asp"-->
<!DOCTYPE html>
<html>

<head>
    <%
easp.include "h.asp"
%>
        <style>
            .layui-textarea {
                height: 638px;
            }
            
            .layui-fluid {
                left: 200px;
            }
        </style>
</head>

<body><br>
    <ul class="layui-nav layui-nav-tree layui-nav-side" lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
            <a href="javascript:;">默认展开</a>
            <dl class="layui-nav-child">
                <%
	dim arr,title_,a,i
      arr=Easp.Fso.List("/dzps/src/layuiadmin/tpl/lse/",1)
      'Easp.PrintString arr
	if ubound(arr)>0 then
		for i=0 to ubound(arr,2)
			title_=arr(0,i)
			echo "<dd><a href='/dzps/src/layuiadmin/tpl/lse/"&title_ &"'>"& title_ &"</a></dd>"
		next
	end if
%>
            </dl>
        </li>
    </ul>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                <button type="button" class="layui-btn" id="bt1">保存</button>
            </div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-md10">
                        <%    
        echo session("test")   
         hi "myurl",val("myurl")
        echo js2("textarea_no_label.html","sitecontent","网站内容",val("sitecontent"))
      %>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/dzps/src/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '/dzps/src/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'useradmin', 'table'], function() {
            var $ = layui.$,
                form = layui.form
            $("a").click(function(event) {
                event.preventDefault();
                var id = $(this).attr('href');
                console.log(id);
                $("#myurl").val(id);

                $.post("ea1.asp", {
                    action: "Read",
                    filePath: id
                }, function(data, status) {
                    $("#sitecontent").val(data);
                });
            });

            $("#bt1").click(function() {
                $.post("ea1.asp", {
                        action: "CreateFile",
                        filePath: "/dzps/src/layuiadmin/tpl/lse/abutton1.html",
                        fileContent: $("#sitecontent").val()
                    },
                    function(data, status) {
                        layer.msg($.parseJSON(data).msg);
                    }
                );
            });

            $("#bt2").click(function() {
                $.post("ea1.asp", {
                    action: "Read",
                    filePath: "/dzps/src/layuiadmin/tpl/lse/abutton1.html"
                }, function(data, status) {
                    $("#sitecontent").val(data);
                });
            });
        });
    </script>
</body>

</html>